<template>
    <p>{{ name }} {{ age }}</p>
    <UserInfo v-model:name="name" v-model:age="age"> </UserInfo>
</template>

<script>
import { reactive, toRefs } from "vue";
import UserInfo from "./UserInfo.vue";
export default {
    name: "VModel",
    components: { UserInfo },
    setup() {
        const state = reactive({
            name: "大伟聊前端",
            age: "20",
        });

        return toRefs(state);
    },
};
</script>
